package com.lecyon.farm.vo.data;

import com.lecyon.farm.vo.base.BaseViewVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author Yao Zheng
 * @Date 2020/5/18 18:56
 */
@ApiModel(value = "周统计作业量Vo")
@Data
public class WorkVolumeByWeek extends BaseViewVo implements Comparable<WorkVolumeByWeek> {

    @ApiModelProperty("星期")
    private String name;

    private Integer dayOfWeek;

    private LocalDate workDate;

    @ApiModelProperty("作业量")
    private BigDecimal value;


    @Override
    public int compareTo(WorkVolumeByWeek workVolumeByWeek) {
        return this.dayOfWeek.compareTo(workVolumeByWeek.getDayOfWeek());
    }

}
